
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>广州浪登数字化量体系统_登陆页面</title>
<meta name="title" content="广州浪登数字化量体系统_E尺量体系统">
<meta name="keywords" content="广州浪登数字化量体系统">
<meta name="description" content="广州浪登数字化量体系统">
<LINK href="favicon.ico" type=image/x-icon rel="shortcut icon" />
<script type="text/javascript">
	if (window.parent != window) {
		//出现了窗口嵌套
		window.parent.location.href = '${pageContext.request.contextPath}/index.jsp';
	}
</script>
<script src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"
	type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/style.css" />
<link type="text/css" rel="stylesheet"
	href="${pageContext.request.contextPath }/css/style_grey.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/ext/portal.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/default.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.portal.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.cookie.js"></script>
<script
	src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"
	type="text/javascript"></script>
<style>
input[type=text] {
	width: 80%;
	height: 25px;
	font-size: 12pt;
	font-weight: bold;
	margin-left: 45px;
	padding: 3px;
	border-width: 0;
}

input[type=password] {
	width: 80%;
	height: 25px;
	font-size: 12pt;
	font-weight: bold;
	margin-left: 45px;
	padding: 3px;
	border-width: 0;
}

#loginform\:codeInput {
	margin-left: 1px;
	margin-top: 1px;
}

#loginform\:vCode {
	margin: 0px 0 0 60px;
	height: 34px;
}
</style>
<script type="text/javascript">
	/* window.onload=function(){
	 $("input[id^='loginform']").keydown(function(event) {
	
	 if (event.keyCode == 13) {//keyCode=13是回车键
	
	 login();

	 };

	 });
	 } */

	function login() {
		var name = $.trim($('[name=username]').attr('value'));
		var pwd = $.trim($('[name=pwd]').attr('value'));
		if (!name || !pwd) {
			$.messager.alert('消息', '<br>请检查输入项是否为空 ', 'info');
		} else {
			$
					.ajax({
						type : 'post',
						url : '${pageContext.request.contextPath}/page.staffLogin.ashx',
						datatype : 'text',
						data : {
							username : name,
							pwd : pwd
						},
						success : function(data) {

							if (data.msg != 'success') {
								changeCaptcha();
								$.messager.alert('消息', '<br>' + data.msg,
										'info');
							} else {
								window.location.href = '${pageContext.request.contextPath}/page.index.ashx';
							}
						}
					});
		}
	}

	/*
	 function validateinput(){
	 var name = $.trim($('[name=username]').attr('value'));
	 var pwd = $.trim($('[name=pwd]').attr('value'));
	 var code = $.trim($('[name=code]').attr('value'));  
	 if (!name ||!pwd||!code) {
	 $.messager.alert('消息','<br>登录失败，请检查输入项是否为空 ','info');

	 return false;
	 }
	 }*/

	/* function login() {

	 var name = $.trim($('[name=username]').attr('value'));
	 var pwd = $.trim($('[name=pwd]').attr('value'));
	 var code = $.trim($('[name=code]').attr('value'));  
	 if (!name ||!pwd||!code) {
	 $.messager.alert('消息','<br>请检查输入项是否为空 ','info');
	 } else {
	 $('#loginform').submit();
	
	 }
	 } 
	 */
	function changeCaptcha() {
		$("[name=img_code]").attr(
				"src",
				"${pageContext.request.contextPath }/page.getCaptcha.ashx?date="
						+ new Date());
	}
</script>
</head>
<body>
	<div
		style="width: 900px; height: 50px; position: absolute; text-align: left; left: 50%; top: 50%; margin-left: -450px;; margin-top: -280px;">
		<img src="${pageContext.request.contextPath }/images/logo.jpg"
			style="border-width: 0; margin-left: 0;" /> <span
			style="float: right; margin-top: 35px; color: #488ED5;">欢迎进入E尺量体系统!</span>
	</div>
	<div class="main-inner" id="mainCnt"
		style="width: 900px; height: 440px; overflow: hidden; position: absolute; left: 50%; top: 50%; margin-left: -450px; margin-top: -220px; background-image: url('${pageContext.request.contextPath }/images/bg_login.jpg')">
		<div id="loginBlock" class="login"
			style="margin-top: 80px; height: 255px;">
			<div class="loginFunc">
				<div id="lbNormal" class="loginFuncMobile">员工登录</div>
			</div>
			<div class="loginForm">
				<form id="loginform" name="loginform" method="post" class="niceform"
					action="${pageContext.request.contextPath}/page.staffLogin.ashx">
					<div id="idInputLine" class="loginFormIpt showPlaceholder"
						style="margin-top: 5px;">
						<input id="loginform:idInput" type="text" name="username"
							class="loginFormTdIpt" maxlength="50" tabindex="1" title="请输入帐号" />
						<label for="idInput" class="placeholder" id="idPlaceholder">帐号：</label>
					</div>
					<div class="forgetPwdLine"></div>
					<div id="pwdInputLine" class="loginFormIpt showPlaceholder">
						<input id="loginform:pwdInput" class="loginFormTdIpt"
							type="password" name="pwd" value="" tabindex="2" title="请输入密码" />
						<label for="pwdInput" class="placeholder" id="pwdPlaceholder">密码：</label>
					</div>
					<div class="loginFormIpt loginFormIptWiotTh"
						style="margin-top: 58px;">
						<%--<div id="codeInputLine" class="loginFormIpt showPlaceholder"
							style="margin-left:0px;margin-top:-40px;width:50px;">
							<input id="loginform:codeInput" class="loginFormTdIpt" type="text"
								name="code" title="请输入验证码" />
							<%--<img id="loginform:vCode" src="${pageContext.request.contextPath }/validatecode.jsp"
								onclick="javascript:document.getElementById('loginform:vCode').src='${pageContext.request.contextPath }/validatecode.jsp?'+Math.random();" />
 				<img id="userCaptcha" src="${path }/user/getCaptcha.do" onclick="changeCaptcha()" class="code" alt="换一张" /><a href="javascript:void(0);" onclick="changeCaptcha()" title="换一张">换一张</a></li>							
						<img  id="loginform:vCode" name="img_code" src="${pageContext.request.contextPath }/page.getCaptcha.ashx"  onclick="changeCaptcha()">
						</div>
  						<a href="${pageContext.request.contextPath}/page.staffLogin.ashx" id="loginform:j_id19" name="loginform:j_id19"> --%>

						<a href="javascript:void(0);" onclick="login()"
							id="loginform:j_id19" name="loginform:j_id19"> <span
							id="loginform:loginBtn" class="btn btn-login"
							style="margin-top: -36px;">登录</span>
						</a>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div
		style="width: 900px; height: 50px; position: absolute; text-align: left; left: 50%; top: 50%; margin-left: -450px;; margin-top: 220px;">
		<span style="color: #488ED5;">Powered By
			http://www.3dcamega.com/</span><span
			style="color: #488ED5; margin-left: 10px;">推荐浏览器（右键链接-目标另存为）：<a
			href="http://pdds.ucweb.com/download/newest/UCBrowser/zh-cn/101/999/www">UC浏览器</a>
		</span><span style="float: right; color: #488ED5;">E尺量体系统</span>
	</div>

</body>
</html>